#ifndef	_TOOLS_H
#define _TOOLS_H 

#ifdef SYMBOL_GLOBALS
   #define TOOLS_EXT
#else
   #define TOOLS_EXT extern
#endif //* SYMBOL_GLOBALS
	 
TOOLS_EXT uint8_t BCDToDecimal(uint8_t ubBCDCode);
TOOLS_EXT void DecimalToBCD(uint32_t unDecimal, uint8_t *pu8BCD, uint32_t unBCDBytes);
TOOLS_EXT uint8_t CaculateWeekDay(uint32_t unYear, uint32_t unMonth, uint32_t unDay);
TOOLS_EXT uint32_t ASCIIDecimalToBCDDecimal(const char *pszASCIIDecimal, uint32_t unASCIIDecimalLen, uint8_t *pubBCDDecimal, uint32_t unBCDDecimalLen); 
TOOLS_EXT uint16_t crc16(const unsigned char *pubCheckData, uint32_t unCheckLen, uint16_t usInitVal); 
TOOLS_EXT void GetSystemWeekEngShort(uint8_t ubWeekDay, char *pszSystemWeek); 
TOOLS_EXT void DelaymsByCount(uint16_t usDelayMS); 

#endif

